package com.bobamrz.domain;

// Generated 01.06.2013 15:30:51 by Hibernate Tools 4.0.0

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * DocCatalog generated by hbm2java
 */
@Entity
@Table(name = "doc_catalog", schema = "public")
public class DocCatalog implements java.io.Serializable {

	private long docCatalog;
	private DocCatalog docCatalog_1;
	private Long catalogOwnerFk;
	private Long docCatalogTypeFk;
	private String name;
	private String description;
	private Long level;
	private Date contentUpdated;
	private Long contentUpdatedBy;
	private String folder;
	private Set<DocCatalog> docCatalogs = new HashSet<DocCatalog>(0);
	private Set<DocumentDocCatalog> documentDocCatalogs = new HashSet<DocumentDocCatalog>(
			0);

	public DocCatalog() {
	}

	public DocCatalog(long docCatalog) {
		this.docCatalog = docCatalog;
	}

	public DocCatalog(long docCatalog, DocCatalog docCatalog_1,
			Long catalogOwnerFk, Long docCatalogTypeFk, String name,
			String description, Long level, Date contentUpdated,
			Long contentUpdatedBy, String folder, Set<DocCatalog> docCatalogs,
			Set<DocumentDocCatalog> documentDocCatalogs) {
		this.docCatalog = docCatalog;
		this.docCatalog_1 = docCatalog_1;
		this.catalogOwnerFk = catalogOwnerFk;
		this.docCatalogTypeFk = docCatalogTypeFk;
		this.name = name;
		this.description = description;
		this.level = level;
		this.contentUpdated = contentUpdated;
		this.contentUpdatedBy = contentUpdatedBy;
		this.folder = folder;
		this.docCatalogs = docCatalogs;
		this.documentDocCatalogs = documentDocCatalogs;
	}

	@Id
	@Column(name = "doc_catalog", unique = true, nullable = false, precision = 10, scale = 0)
	public long getDocCatalog() {
		return this.docCatalog;
	}

	public void setDocCatalog(long docCatalog) {
		this.docCatalog = docCatalog;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "upper_catalog_fk")
	public DocCatalog getDocCatalog_1() {
		return this.docCatalog_1;
	}

	public void setDocCatalog_1(DocCatalog docCatalog_1) {
		this.docCatalog_1 = docCatalog_1;
	}

	@Column(name = "catalog_owner_fk", precision = 10, scale = 0)
	public Long getCatalogOwnerFk() {
		return this.catalogOwnerFk;
	}

	public void setCatalogOwnerFk(Long catalogOwnerFk) {
		this.catalogOwnerFk = catalogOwnerFk;
	}

	@Column(name = "doc_catalog_type_fk", precision = 10, scale = 0)
	public Long getDocCatalogTypeFk() {
		return this.docCatalogTypeFk;
	}

	public void setDocCatalogTypeFk(Long docCatalogTypeFk) {
		this.docCatalogTypeFk = docCatalogTypeFk;
	}

	@Column(name = "name")
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "description")
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "level", precision = 10, scale = 0)
	public Long getLevel() {
		return this.level;
	}

	public void setLevel(Long level) {
		this.level = level;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "content_updated", length = 29)
	public Date getContentUpdated() {
		return this.contentUpdated;
	}

	public void setContentUpdated(Date contentUpdated) {
		this.contentUpdated = contentUpdated;
	}

	@Column(name = "content_updated_by", precision = 10, scale = 0)
	public Long getContentUpdatedBy() {
		return this.contentUpdatedBy;
	}

	public void setContentUpdatedBy(Long contentUpdatedBy) {
		this.contentUpdatedBy = contentUpdatedBy;
	}

	@Column(name = "folder")
	public String getFolder() {
		return this.folder;
	}

	public void setFolder(String folder) {
		this.folder = folder;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "docCatalog_1")
	public Set<DocCatalog> getDocCatalogs() {
		return this.docCatalogs;
	}

	public void setDocCatalogs(Set<DocCatalog> docCatalogs) {
		this.docCatalogs = docCatalogs;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "docCatalog", cascade = {CascadeType.ALL})
	public Set<DocumentDocCatalog> getDocumentDocCatalogs() {
		return this.documentDocCatalogs;
	}

	public void setDocumentDocCatalogs(
			Set<DocumentDocCatalog> documentDocCatalogs) {
		this.documentDocCatalogs = documentDocCatalogs;
	}

}
